package team.zero.lemon.module.workflow.web;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import team.zero.lemon.common.authz.annotation.AuthPassport;
import team.zero.lemon.module.workflow.entity.Form;
import team.zero.lemon.module.workflow.entity.Instance;
import team.zero.lemon.module.workflow.service.FormService;
import team.zero.lemon.module.workflow.service.InstanceService;

/**
 * Created by Bo on 2016/11/28.
 */
@Controller
@ResponseBody
@AuthPassport
@RequestMapping(value = "/workflow/instance", method = {RequestMethod.POST, RequestMethod.GET})
public class InstanceController {


    @Autowired
    private InstanceService instanceService;

    @AuthPassport
    @RequestMapping("/find")
    public Instance saveform(@RequestBody Instance instance) {
        return instanceService.findById(instance.getId());
    }
}
